package com.zhongnan.demo6;

public class Sisuo {
    public static void main(String[] args) {
        Object objA = new Object();
        Object objB = new Object();
        new Thread(() -> {
            synchronized (objA) {
                synchronized (objB) {

                }
            }
        });
        new Thread(() -> {
            synchronized (objB) {
                synchronized (objA) {

                }
            }
        });
    }
}
